package com.sean.activity;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;

import com.sean.iphoneAppWorkspace.DataVo;
import com.sean.iphoneAppWorkspace.DragWorkspace;

public class Main extends Activity {
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
//        DragLayout ly = new DragLayout(this);
//        for(int i = 0; i < 9; i ++) {
//        	DataVo data = new DataVo();
//        	data.setText("a" + i);
//        	data.setIcon(R.drawable.appicon);
//        	DragItemView btn = new DragItemView(this, data);
//            ly.addView(btn);
//        }
//        ly.setBackgroundColor(Color.parseColor("#aa1111"));
//        this.setContentView(ly);
        
        List<DataVo> dataList = new ArrayList<DataVo>();
        for(int i = 0; i < 40; i ++) {
        	DataVo data = new DataVo();
        	data.setText("text" + i);
//        	if(i % 2 == 0) {
        		data.setIcon(R.drawable.appicon);
//        	} else {
//        		data.setIcon(R.drawable.icon);
//        	}
        	dataList.add(data);
        }
        DragWorkspace dragWorkspace = new DragWorkspace(this, dataList);
        this.setContentView(dragWorkspace);
    }
}